<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        
    </style>
</head>
<body>
    
</body>
<script>

    function fn(){
        let a = 10;
        let b = 20;
        let c = 30;

        return {
            set A(val){
                a = val;
            },
            get A(){
                return a;
            },
            set B(val){
                b = val;
            },
            get B(){
                return b;
            },
            set C(val){
                c = val;
            },
            get C(){
                return c;
            }
        }
    }
    const f = fn();
    f.A = "world";
    f.C = 365;

    console.log(f.A)
    console.log(f.C)
    console.log(f.B)
    
</script>
</html>